package com.wcy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wcy.annotation.pageVo.PageColumn;
import com.wcy.annotation.pageVo.PageName;
import com.wcy.annotation.pageVo.SelectionAnnotation;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
/**
 * <p>
 * 
 * </p>
 *
 * @author 吴传亿
 * @since 2025-04-29
 */
@Getter
@Setter
@ToString
@TableName("sr_menu")
@Accessors(chain = true)
@PageName(name = "菜单")
public class SrMenu {

    @PageColumn(isId = true,prop="id", label="菜单ID",allowEdit = false)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @PageColumn(prop="pid", label="父级菜单ID",type="select",selectRef = @SelectionAnnotation(apiUrl = "menu/list",mapProp = "id",mapLabel = "name"))
    private Integer pid;

    @PageColumn(prop="name", label="菜单名称")
    private String name;

    @PageColumn(prop="url", label="菜单地址")
    private String url;

    @PageColumn(prop="icon", label="菜单图标")
    private String icon;

    @PageColumn(prop="permId", label="权限ID",type = "select",selectRef = @SelectionAnnotation(apiUrl = "permission/list",mapProp = "permissionId",mapLabel = "permissionName"))
    private Integer permId;

    @PageColumn(prop="sortOrder", label="排序")
    private Integer sortOrder;
}
